﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace InterfacesInstanceClustering
{
    public partial class IClusteringUC : UserControl
    {
        public IClusteringUC()
        {
            InitializeComponent();
        }

        private string inputVectorFile = string.Empty;

        public string InputVectorFile
        {
            get { return inputVectorFile; }
            set { inputVectorFile = value; }
        }

        private void button_IVFSet_Click(object sender, EventArgs e)
        {
            openFileDialog.Multiselect = false;
            openFileDialog.InitialDirectory = Directory.GetCurrentDirectory();
            openFileDialog.FileName = string.Empty;
            openFileDialog.Filter = "Text File (*.txt) |*.txt";

            if (openFileDialog.ShowDialog() == DialogResult.OK)
            {
                this.textBox_InputVectorFile.Text = openFileDialog.FileName;
                inputVectorFile = openFileDialog.FileName;
            }
        }

        private string outputClusterPath = string.Empty;

        public string OutputClusterPath
        {
            get { return outputClusterPath; }
            set { outputClusterPath = value; }
        }

        private void button_OCFSet_Click(object sender, EventArgs e)
        {
            folderBrowserDialog.SelectedPath = Directory.GetCurrentDirectory();
            if (this.folderBrowserDialog.ShowDialog() == DialogResult.OK)
            {
                this.textBox_OutputClusterFile.Text = folderBrowserDialog.SelectedPath;
                outputClusterPath = folderBrowserDialog.SelectedPath;
            }
        }        
    }
}
